<?php
/**          
**/

include('../../include/config.inc.php');
include(CE_ROOT.'/include/admin/check.inc.php');
include(CE_ROOT.'/include/celive.class.php');
$admin_header = new celive();
$admin_header->template();
$admin_header->admin_xajax_live();

$chatid = addslashes($_GET['chatid']);
$sql = "SELECT * FROM `chat` WHERE `id`='".$chatid."'";
@$result = $db->query($sql);
$ip = $result[0]['ip'];
$ip = convertip($ip);

$GLOBALS['template']->assign('chatid',$chatid);

$GLOBALS['template']->assign('name', $result[0]['name']);
$GLOBALS['template']->assign('email', $result[0]['email']);
$GLOBALS['template']->assign('phone', $result[0]['phone']);
$GLOBALS['template']->assign('ip', $result[0]['ip']);
$GLOBALS['template']->assign('area', $ip);

$GLOBALS['template']->assign('ifexit','<script type="text/javascript">
							 function chat_unload()
							 {
								 if(event.clientX>document.body.clientWidth&&event.clientY<0||event.altKey) 
								 { 
								 xajax_EndChat();
								 } 
								 }
								 </script>');
$GLOBALS['template']->assign('xajax_live',$admin_xajax_live->getJavascript('../'));
$GLOBALS['template']->display('admin/live/header.htm');
?>